<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="t" uri="http://tiles.apache.org/tags-tiles"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"%>

<div>
  <!--<h3>Teach + Learn + Social + Wisdom of Crowds = Kungkhies! </h3>-->
  
  
  
  <p>Here are some kungkhies that have been published recently...</p>

   <ol class="kungkhie-list">
    <c:forEach var="kungkhie" items="${kungkhies}"> <!--<co id="cp_foreach_kungkhies"/>-->
    
      <s:url value="/kungkhers/{kungkherName}" 
                  var="kungkher_url" >    <!--<co id="cp_kungkher_url"/>-->
        <s:param name="kungkherName" 
                      value="${kungkhie.kungkher.username}" />
      </s:url>

      <li><span class="kungkhieListImage">
        <img src=
          "http://localhost:8080/kungkhie_dev4/resources/images/kungkhers/${kungkhie.kungkher.id}.jpg"
               width="48"
               border="0" 
               align="middle" 
               onError="this.src='<s:url value="/resources/images"/>/kungkher_avatar.png';"/>
      </span>
      <span class="kungkhieListText">
        <a href="${kungkher_url}">              
          <c:out value="${kungkhie.kungkher.username}" /></a>
          - <c:out value="${kungkhie.text}" /><br/>          
         <small><fmt:formatDate value="${kungkhie.when}" pattern="hh:mma MMM d, yyyy" /></small>
      </span></li>
    </c:forEach>
  </ol>
     
  </ol>
</div>
